home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / ASM-ARM / PAGE.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  568b  |  23 lines

  1. #ifndef _ASMARM_PAGE_H
  2. #define _ASMARM_PAGE_H
  3.  
  4. #include <asm/arch/mmu.h>
  5. #include <asm/proc/page.h>
  6.  
  7. #ifdef __KERNEL__
  8.  
  9. #define get_user_page(vaddr)        __get_free_page(GFP_KERNEL)
  10. #define free_user_page(page, addr)    free_page(addr)
  11. #define clear_page(page)    memzero((void *)(page), PAGE_SIZE)
  12. #define copy_page(to,from)    memcpy((void *)(to), (void *)(from), PAGE_SIZE)
  13.  
  14. #endif
  15.  
  16. /* unsigned long __pa(void *x) */
  17. #define __pa(x)            __virt_to_phys((unsigned long)(x))
  18.  
  19. /* void *__va(unsigned long x) */
  20. #define __va(x)            ((void *)(__phys_to_virt((unsigned long)(x))))
  21.  
  22. #endif
  23.